<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        // var str = 'hello wworld'
        // res = str.indexOf('wo')
        // console.log(res)
        /*
        split,吧字符串转换为数组
         */
        var  a = 'abc,bcd,efg'
        var  arr = ['abc', 'bcd', 'efg']
        res = a.split(',')
        res2 = arr.toString()
        // console.log(res)
        console.log(res2)
        console.log(typeof res2)


    </script>
</head>
<body>

</body>
</html>